<template>
	<view>
		<!--#ifdef MP-WEIXIN-->
		<view class="index-header-bar" :style="{height: `${setStore?.menuButton?.top || 0}px`}"></view>
		<view class="menu-button main-flex"
		:style="{ height: `${setStore?.menuButton?.height || 0}px`,
			width: `${setStore?.menuButton?.left || 0}px`}">
			<slot></slot>
		</view>	
		<!--#endif-->
		<!--#ifndef MP-WEIXIN-->
		<view class="index-header-bar" :style="{height: `${setStore?.menuButton?.barHeight || 0}px`}"></view>
		<!-- <view class="menu-button main-flex"
		:style="{ height: `${setStore?.menuButton?.height || 0}px`}">
			<slot></slot>
		</view>	 -->
		<!--#endif-->
	</view>
</template>

<script setup>
	/**
	 * MenuButton 小程序胶囊
	 * @description 小程序胶囊
	 */
	import { computed, onMounted, ref, watch } from "vue"
	import useSetStore from "@/store/modules/set"
	
	const setStore = useSetStore()
	
	// // 页面设置
	// const menuButton = computed(() => {
	// 	let height = 32
	// 	let top = 0
	// 	// #ifdef MP-WEIXIN
	// 	let left = 260
	// 	const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
	// 	if (menuButtonInfo) {
	// 		height = menuButtonInfo.height
	// 		top = menuButtonInfo.top
	// 		left = menuButtonInfo.left
	// 	}
	// 	// #endif
	// 	// #ifndef MP-WEIXIN
	// 	let left = uni.getWindowInfo().windowWidth
	// 	// #endif
	// 	return {
	// 		height,
	// 		top,
	// 		left
	// 	}
	// })
	
</script>

<style lang="scss" scoped>
  .menu-button {
		box-sizing: border-box;
	}
</style>
